home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group99a.txt
/
000142_icon-group-sender _Tue Jun 22 12:33:06 1999.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
1KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id MAA01037
for icon-group-addresses; Tue, 22 Jun 1999 12:32:55 -0700 (MST)
Message-Id: <199906221932.MAA01037@baskerville.CS.Arizona.EDU>
From: dgamey@ca.ibm.com
X-Lotus-FromDomain: IBMCA@IBMUS
To: Kostas Oikonomou <oikonomou@att.com>
cc: icon-group@optima.CS.Arizona.EDU
Date: Tue, 22 Jun 1999 13:41:34 -0400
Subject: Re: Assertions in Icon
Content-Disposition: inline
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
>Does anyone have a suggestion about how to implement a procedure "assert",
>which, when called with an expression "e" as argument, implements
>
> e | stop("Assertion on line ", &line, " failed!")
>
>Here &line should be the line on which assert(e) appears.
I don't think there is a way to get your callers &line, unless you provide it as
a parameter to each call. There may be some other possibilities but they seem
messy to me.
Another route is to use runerr() instead of stop which will cause a program
termination with a traceback. Not as pretty but serviceable.
Hope that helps.
David